using System;
using System.Collections.Generic;
using System.Text;

namespace SangoBang.Cards
{
    class RoleCard : Card
    {
        public RoleCard() { }
        public RoleCard(RoleEnum role) { this.role = role; }
        public RoleCard(String role)
        {
            this.role = roleDict[role];
        }
        public RoleEnum role;
        public enum RoleEnum
        {
            Zhugong = 0,
            Zhongchen,
            Fanzei,
            Neijian
        }
        static private Dictionary<String, RoleEnum> roleDict = makeRoleCardsDictionary();
        static Dictionary<String, RoleEnum> makeRoleCardsDictionary()
        {
            Dictionary<String, RoleEnum> dict = new Dictionary<String, RoleEnum>();
            dict.Add("P Zhugong", RoleEnum.Zhugong);
            dict.Add("P Zhongchen", RoleEnum.Zhongchen);
            dict.Add("N Fanzei", RoleEnum.Fanzei);
            dict.Add("A Neijian", RoleEnum.Neijian);
            return dict;
        }
        static private Dictionary<RoleEnum, String> roleDictReverse = makeRoleCardsDictionaryReverse();
        static Dictionary<RoleEnum, String> makeRoleCardsDictionaryReverse()
        {
            Dictionary<RoleEnum, String> dict = new Dictionary<RoleEnum, String>();
            dict.Add(RoleEnum.Zhugong, "P Zhugong");
            dict.Add(RoleEnum.Zhongchen, "P Zhongchen");
            dict.Add(RoleEnum.Fanzei, "N Fanzei");
            dict.Add(RoleEnum.Neijian, "A Neijian");
            return dict;
        }
        public override String ToString()
        {
            return roleDictReverse[role];
        }
    }
}
